function obj = LockXe129(obj, varargin)
    L = log4m.getLogger;
    p=inputParser;
    p.addParameter('pVal', 1e-3, @isnumeric);
    p.addParameter('iVal', 50e-6, @isnumeric);
    p.parse(varargin{:});
    
    obj.ziSlave.setPIDMode('2', 0);
    obj.ziSlave.setPIDInput('2', 3); % DemodPhase
    obj.ziSlave.setPIDInputChannel('2', 2); % ziDemod '2'
    obj.ziSlave.setPIDSetpoint('2', -90.0);
    obj.ziSlave.disablePIDPhaseUnwarp('2');
    obj.ziSlave.setPIDOutput('2', 5);
    obj.ziSlave.setPIDOutputChannel('2', 2);
    obj.ziSlave.setPIDCenter('2', obj.MainField.bz0);
    obj.ziSlave.setPIDLimLower('2', -2e-3);
    obj.ziSlave.setPIDLimUpper('2', 2e-3);
    obj.ziSlave.setPValue('2', p.Results.pVal);
    obj.ziSlave.setIValue('2', p.Results.iVal);
    obj.ziSlave.setDValue('2', 0.0);
    obj.ziSlave.setDLimValue('2', 0.0);
    obj.ziSlave.setRateValue('2', 2e6);
    obj.ziSlave.lock('2');
    L.info('ParametricMagnetometer::LockXe129', sprintf('Xe129 is locked: Px=[%5.3e], Ix=[%5.3e]', p.Results.pVal, p.Results.iVal));
end

